Automatic white balance correction method for image capturing apparatus

ABSTRACT

Disclosed is an automatic white balance method for image capturing apparatus. An image capturing apparatus captures a color image first and performs gray point searching in RGB color space or YUV color space. The color correction coefficient sets of red color, green color and blue color components of each gray points are computed respectively, and then the color correction coefficient sets of all the gray points are averaged to generate a color correction average value set. Each pixel of the color image is color-corrected in a color space according to the color correction average value set so as to obtain an optimum white balance effect. The present invention is beneficial for the reduction of design cost, downsizing of storage memory space, decrease of computation quantity and simplification of image-searching process.

FIELD OF THE INVENTION

[0001] The present invention is related to an automatic white balancecorrection method for an image capturing apparatus, and moreparticularly to an automatic white balance correction method by usinggray points to perform color correction.

BACKGROUND OF THE INVENTION

[0002] Digital color imaging technology has been widely used in variousmultimedia peripheral devices and image capturing apparatuses, forexample, digital still camera, digital video recorder and so on. In somesituations the color of an object itself will be different in accordancewith the change of the color of incident light, however, human eye willadapt to the colors of incident light source quickly and automatically.Unfortunately, image capturing apparatus does not provide with thefunction of achieving natural color. To correct the color derivationresulting from source light and obtain more natural looking colors, acrucial element is typically used in digital color image processingapplications, which is known as white balance technique.

[0003] The purpose of white balance correction is to allow the imagecapturing apparatus to function as human eyes, which automaticallyadjust internal color balance by calculating an average of differentilluminations, such that the hue and tinge of white color can beactually displayed under all conditions. In other words, automatic whitebalance technique generally adjusts the intensities of three originalcolors—red, green and blue within the entire image according tocomputation result of the image properties in the present digital imageframe, and thereby correct the color deviation resulting from externalsource light.

[0004] The conventional automatic white balance correction methodologynormally uses white points to perform color image correction. An exampleof the conventional art is described in U.S. Pat. No. 6,069,972, whichis incorporated herein for reference. The automatic white balancecorrection methodology suggested in this conventional art referenceaccomplishes a global search to the captured color image. After all thewhite points defining a color image have been searched out, an averageof these white point component values is evaluated. Subsequently, theevaluated average is used to compute the color correction coefficientsof the white point component values with respect to each pixel componentvalues. Eventually, the computed color correction coefficients are usedto perform color correction to each pixel components of the color image,and further automatically adjusting to obtain the most appropriate whitebalance.

[0005] However, in the above steps of white point searching, white pointcolor correction coefficient computation and color correction, each steprequires to search the entire color image, i.e. the brightest whitepoint must be searched out, which leads to the consumption of longertime. In addition, the above-described white balance methodologyrequires to identify and record the white points in the entire image soas to compute the white point color correction coefficient. This willexplicitly indicate that a larger memory space is needed to storeconsiderable computational data, and on the other hand, this willimplicitly indicate that the work loading of hardware integrated circuitwill increase due to enormous computation quantity.

SUMMARY OF THE INVENTION

[0006] The main object of the present invention is to provide anautomatic white balance correction method for an image capturingapparatus, wherein the automatic white balance correction method of thepresent invention uses gray point searching in place of white pointsearching and performs color correction to the captured color imagethrough the gray points, so as to obtain an optimum white balanceeffect.

[0007] Another object of the present invention is to provide anautomatic white balance correction method with minimum storage memoryspace, minimum image-searching iteration and minimum computationquantity.

[0008] Another further object of the present invention is to provide anautomatic white balance correction method for an image capturingapparatus, which computes color correction coefficient sets for eachgray points so as to be implemented in hardware wiring and suitable forsimple software design.

[0009] To accomplish the foregoing objects, the present inventionutilizes an image capturing apparatus to capture a color image. Thepixel component of the color image will be determined if it is a graypoint at the time it is captured, and compute the color correctioncoefficients of each color components of each gray points respectively.The color correction coefficients are then averaged to generate a colorcorrection average value set. A color correction process is thenperformed to each pixel of the color image according to the colorcorrection average value set. It is remarkable that the presentinvention is not necessary to determine the brightest gray points aswhite points in the present color image frame, instead, the presentinvention directly computes the color correction coefficients of eachgray point that are likely to be determined as white points, so that theimage-searching process can be significantly simplified.

[0010] The other objects, features and advantages of the presentinvention will become more apparent through the following descriptionswith reference to the accompanying drawings, wherein:

BRIEF DESCRIPTION OF THE DRAWINGS

[0011]FIG. 1 shows a flow chart illustrating the white balancecorrection method through the use of gray points according to apreferred embodiment of the present invention.

[0012]FIG. 2 is a structural view schematically illustrating whitebalance correction method according to a preferred embodiment of thepresent invention.

[0013]FIG. 3 is a structural view schematically illustrating whitebalance correction method according to another preferred embodiment ofthe present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

[0014] The present invention is distinct from the conventional art interms of the utilization of gray point searching instead of white pointsearching, and performs color correction to the image seized from theimage capturing apparatus through the use of color correctioncoefficient sets being computed based on these gray points. Therefore,the most appropriate white balance for the color image can be obtained.

[0015]FIG. 1 shows a flow chart illustrating the white balancecorrection method through the use of gray points according to apreferred embodiment of the present invention. First, please refer toFIG. 1 in which a color image capturing apparatus, such as acharge-coupled device (CCD) image sensor or a CMOS image sensor, isutilized to capture a color image, and define gray points in RGB or YUVcolor space so as to search a plurality of gray points in the capturedcolor image.

[0016] Next at step S12, the white balance correction coefficients ofeach color component of each gray point are computed respectively, suchthat each gray point has a correction coefficient set. Next at step S14the correction coefficient sets of all the gray points are averaged togenerate a color correction average value set. Color correction isperformed to each pixel in the captured color image in RGB color spaceor YUV color space according to the color correction average value set.In this way, the color deviation resulting from external source lightcan be corrected under various conditions and the most appropriate whitebalance correction can be calculated, so that the hue and tinge of whitecolor can be actually displayed under all conditions.

[0017] In particular, three color components of the color-correctedpixel will satisfy the following equations after automatic white balancecorrection, Rc=Gc=Bc, and the luminance of color image before colorcorrection is identical to the luminance of color image after colorcorrection.

[0018] Up to now, the principles of automatic white balance correctionmethod according to the present invention have been fully described, itis particularly intended to give an exemplarily preferred embodiment toexplicate the foregoing theorems, in order that the technicians skilledin the art can acquire sufficient knowledge to implement the presentinvention accordingly with reference to the descriptions of thisexemplarily preferred embodiment.

[0019] As shown in FIG. 2, a color image capturing apparatus 10 is usedto capture a color image. After searching out a plurality of graypoints, a counter 12 is used to compute the red color, green color andblue color component values of each pixel of the plurality of graypoints, thereby determining if they satisfy the criteria of gray pointcondition. The criteria of gray point condition includes:

[0020] (a) (|G−B|<Bt) and (|G−R|<Rt), where Bt represents the thresholdvalue of blue color, and Rt represents the threshold value of red color;and

[0021] (b) G>Gt, where Gt represents the threshold value of green color.

[0022] Besides, an alternative definition of the gray point conditioncan be obtained through the following criteria:

[0023] (c) The maximum value of (|G−B|, |G−R|, |R−B|)≦ or <ColorThreshold; and

[0024] (d) G≧ or >Gt, where Gt represents the threshold value of greencolor.

[0025] If the pixel components satisfying both criteria (a) and (b) willbe determined as gray points. Similarly, the pixel components satisfyingboth criteria (c) and (d) will be also determined as gray points. If thepixel element only satisfies criterion (c), it may also be defined as agray point.

[0026] After obtaining a plurality of gray points that satisfy thecriteria of gray point condition, a processor 14 is used to compute thecolor correction coefficients of red color, green color and blue colorcomponents of these gray points respectively and performs coloraddition. The computation of color correction coefficients is carriedout by means of the following equations:

Y=a×R+b×G+c×B, where a+b+c=1.0

Yc=aa×Rc+bb×Gc+cc×Bc, where aa+bb+cc=1.0

Rc=r×R, Gc=g×G, Bc=b×B

and since (Y=Yc) & (Rc=Gc=Bc), then

r=Yc/((aa+bb+cc)×R)=Y/R

g=Yc/((aa+bb+cc)×G)=Y/G

b=Yc/((aa+bb+cc)×B)=Y/B

[0027] Consequently, the color correction coefficient set of each graypixel component is (r,g,b).

[0028] Next, a divider 16 is utilized to average the color correctioncoefficient sets of all gray points and generate a color correctionaverage value set. Finally, a multiplier 18 performs color correction toeach pixel component of the color image by performing computation withthe color correction average value set together with original RGB colorvalues, and further outputs corrected RGB color values. In this manner,the purpose of automatic white balance is achieved. In other words, thedivider 16 and the multiplier 18 perform white balance computation in afashion as defined in the following equations:

r _(—) av=(Σr)/N, b _(—) av=(Σb)/N and g _(—) av=(Σg)/N,

[0029] where N is the number of captured gray points;

then Rc=r _(—) av×R, Gc=g _(—) av×G, Bc=b _(—) av×B.

[0030] Thus, the three original color components of each gray pixel canbe determined.

[0031] In addition to the above gray point conditions that are dominatedby green color component, there are other gray point conditions, forexample, (|R−B|<Bt) and (|R−G|<Gt), and R>Rt; or (|B−R|<Rt) and(|B−G|<Gt), and B>Bt. Briefly summarized, the gray point condition mustcomply with the criteria of: an absolute differential value of the firstcolor component and the second color component is less than a thresholdvalue of the second color component, an absolute differential value ofthe first color component and the third color component is less than athreshold value of the third color component, and the first colorcomponent value is greater than a threshold value of the first colorcomponent.

[0032] Another preferred embodiment of the present invention isdiagrammatically illustrated by way of FIG. 3, wherein the colorcorrection coefficients of the red color and blue color components arecomputed only. The computation of the color correction coefficients inthis preferred embodiment is accomplished by the formulas of r=G/R andb=G/B, so that the color correction coefficient set of each gray pixelcomponent is (r,b). Next, while the white balance computation isperforming after the color correction coefficient set is obtained, thecomputation algorithm for performing white balance correction is inreference to the following formulas:

r _(—) av=(Σr)/N, b _(—) av=(Σb)/N,

[0033] where N is the number of captured gray points,

then Rc=r _(—) av×R, Gc=G, Bc=b _(—) av×B,

[0034] so as to compute the three original color components of each graypoint. It is noteworthy that the present preferred embodiment is similarto the previous preferred embodiment except for the computation of redcolor and blue color components, and it is not intended to give otherirrelevant details herein.

[0035] Furthermore, if the present invention desires to accomplish graypoint searching or color correction in YUV color space, the gray pointshould meet the criteria of: an absolute value of a color component mustbe less than a threshold value of its color component, and an absolutevalue of another color component must be less than a threshold value ofits color component. That is to say, the absolute value of chroma Cb (V)color component is less than the threshold value of the chroma Cb (V)color component and the chroma Cr (U) color component is less than thethreshold value of the chroma Cr (U) color component. The absolute valueand the threshold value of Y color component do not need to compute,they can be computed by performing inverse operations to RGB or RB. Thecomputation algorithm is arranged as follows:

R=y1×Y+u1×U+v1×V

G=y2×Y+u2×U+v2×V

B=y3×Y+u3×U+v3×V

[0036] The automatic white balance correction method through the use ofgray points to perform color correction according to the presetinvention has the following advantages:

[0037] 1. The automatic white balance correction method using whitepoint searching according to the conventional art requires to search outthe brightest pixel component in the color image as white points. Bycontrast, the present invention uses gray point searching in place ofwhite point searching, which can eliminate the process of searching theentire color image for once. As a result, the conventional automaticwhite balance correction method requires to perform global searching tothe entire color image for three times, while the present inventionrequires to perform global searching to the entire color image twiceonly. It is evident from the above statements that the present inventionis more time-saving and can reduce the times of image-searchingiteration.

[0038] 2. In the conventional art, it is essential to identify andrecord white points, so that color addition can be performed to thedefined white points in the second image-searching process. However, thepresent invention actually does not need this sophisticated process, sothat the storage memory space can be saved.

[0039] 3. If we use white point searching to perform white balancecorrection, the number of captured pixels is not as many as using graypoints. Therefore, gray point searching can be used to provide a coloraverage value with more accuracy.

[0040] 4. The automatic white balance correction method of the presentinvention computes color correction coefficient set for each graypoints. Because the determination of gray point is relative to the colorof this pixel component only, the information of the entire color imageis not necessary. Once the color of pixel component is determined as agray point, it will be immediately transferred to next stage of hardwareintegrated circuit or next software program to compute color correctioncoefficients. Thus, the automatic white balance correction method of thepresent invention is suitable for pipeline hardware architecture orsimplified software design.

[0041] 5. The pixel luminance can be maintained constant if we performcolor correction to red color, green color and blue color componentssimultaneously.

[0042] According to the present invention, it is not necessary todetermine what are the brightest gray points in the color image as whitepoints, instead, the present invention directly computes the colorcorrection coefficients of each gray points that are likely to bedetermined as white points, so that the image-search process can besimplified. It is obvious that the present invention provides a devisalof automatic white balance correction method with minimum design cost,minimum storage memory space, minimum times of image-searching iterationand minimum computation quantity.

[0043] Although the present invention has been described and illustratedin detail, it is to be clearly understood that the same is by the way ofillustration and example only and is not to be taken by way oflimitation, the spirit and scope of the present invention being limitedonly by the terms of the appended claims.

What is claimed is:
 1. An automatic white balance correction method foran image capturing apparatus, comprising the steps of: capturing a colorimage by an image capturing apparatus and initiating a gray pointsearching; computing color correction coefficient sets of each of afirst color component, a second color component, and a third colorcomponent of each gray points in the color image respectively; averagingcolor correction coefficient sets of the gray points of the color imageand generating a color correction average value set; and performingcolor correction according to the color correction average value set toeach pixel of the color image.
 2. The automatic white balance correctionmethod according to claim 1 wherein the gray point searching comprisingdefining gray points in a RGB color space or a YUV color space.
 3. Theautomatic white balance correction method according to claim 1 whereineach pixel after color correction is comprised of a red color component,a green color component, and a blue color component.
 4. The automaticwhite balance correction method according to claim 1 wherein theluminance of the color image before color correction is identical to theluminance of the color image after color correction.
 5. The automaticwhite balance correction method according to claim 1 wherein the graypoints are satisfied with the criteria of: an absolute value of a colordifference between the green color component and the blue colorcomponent is less than a threshold value, and an absolute value of acolor difference between the green color component and the red colorcomponent is less than another threshold value.
 6. The automatic whitebalance correction method according to claim 5 wherein the gray pointsare further satisfied with a criterion of that a green color componentvalue is greater than or equal to a threshold value.
 7. The automaticwhite balance correction method according to claim 3 wherein the graypoints are satisfied with the criteria of: an absolute value of a colordifference between the red color component and the blue color componentis less than a threshold value, and an absolute value of a colordifference between the red color component and the green color componentis less than another threshold value.
 8. The automatic white balancecorrection method according to claim 7 wherein the gray points arefurther satisfied with a criterion of that a red color component valueis greater than or equal to a threshold value.
 9. The automatic whitebalance correction method according to claim 2 wherein the gray pointsare satisfied with the criteria of: an absolute value of a chroma red(V) color component is less than a threshold value, and an absolutevalue of a chroma blue (U) color component is less than anotherthreshold value.
 10. The automatic white balance correction methodaccording to claim 9 wherein the gray points are further satisfied withthe criterion of that the luminance color (Y) component value is greaterthan or equal to a threshold value.
 11. The automatic white balancecorrection method according to claim 1 wherein the gray points aresatisfied with the criteria of: an absolute value of a color differencebetween the blue color component and the green component is less than athreshold value, and an absolute value of a color difference between theblue color component and the red color component is less than anotherthreshold value.
 12. The automatic white balance correction methodaccording to claim 11 wherein the gray points are further satisfied witha criterion of that a blue color component value is greater than orequal to a threshold value.
 13. An automatic white balance correctionmethod for an image capturing apparatus, comprising the steps of:capturing a color image by an image capturing apparatus and initiating agray point searching; computing color correction coefficient sets ofeach color components of each gray points in the color imagerespectively; averaging color correction coefficient sets of the graypoints of the color image and generating a color correction averagevalue set; and performing color correction according to the colorcorrection average value set to each pixel of the color image.
 14. Theautomatic white balance correction method according to claim 13 whereinthe gray point searching comprising defining gray points in a RGB colorspace or a YUV color space.
 15. The automatic white balance correctionmethod according to claim 14 wherein color values of the YUV color spaceare computed from color values of the RGB color space.
 16. The automaticwhite balance correction method according to claim 13 wherein aluminance of the color image before color correction is identical to aluminance of the color image after color correction.
 17. The automaticwhite balance correction method according to claim 13 wherein each graypoint is comprised of a first color component, a second color component,and a third color component.
 18. The automatic white balance correctionmethod according to claim 17 wherein each of the first color componentvalue, the second color component value, and the third color componentvalue is an arbitrary combination of a red color value, a green colorvalue, and a blue color value.
 19. The automatic white balancecorrection method according to claim 17 wherein each of the first colorcomponent value, the second color component value, and the third colorcomponent value is an arbitrary combination of a chroma red color (Y)value, a chroma green color (U) value, and a chroma blue color (V)value.
 20. The automatic white balance correction method according toclaim 17 wherein the gray points are satisfied with the criteria of: anabsolute value of a color difference between of the first colorcomponent and the second color component is less than a threshold value,and an differential value of a color difference between the first colorcomponent and the third color component is less than another thresholdvalue.
 21. The automatic white balance correction method according toclaim 20 wherein the gray points are further satisfied with a criterionof that a first color component value is greater than or equal to athreshold value.
 22. The automatic white balance correction methodaccording to claim 17 wherein the gray points are satisfied with thecriterion of: a maximum among an absolute value of a color differencebetween the first color component and the second color component, anabsolute value of a color difference between the second color componentand the third color component, and an absolute value of a colordifference between the first color component and the third colorcomponent is less than or equal to the threshold value.
 23. Theautomatic white balance correction method according to claim 17 whereinthe gray points are satisfied with a criterion of that a first colorcomponent value is greater than or equal to a threshold value.
 24. Theautomatic white balance correction method according to claim 17 whereinthe gray points are satisfied with the criteria of: an absolute value ofthe first color component is less than a threshold value, and anabsolute value of the second color component is less than anotherthreshold value.